package cn.sirun.com.fca.personal.center.block.item.impl;

import cn.sirun.com.fca.account.model.login.PersonalInfo;
import cn.sirun.com.fca.personal.center.block.item.IPersonalInfoItem;

public class PersonalInfoItem implements IPersonalInfoItem {
    private String mUserPhone;
    private String mUserEmail;
    private boolean mWxBind;

    public PersonalInfoItem(PersonalInfo personalInfo){
        mUserPhone = personalInfo.getUserPhone() == null ? "" : personalInfo.getUserPhone();
        mUserEmail = personalInfo.getEmail() == null ? "" : personalInfo.getEmail();
        mWxBind = personalInfo.isWxBind();
    }

    public PersonalInfoItem(String mUserPhone, String mUserEmail) {
        this.mUserPhone = mUserPhone;
        this.mUserEmail = mUserEmail;
    }

    @Override
    public String getUserPhone() {
        return mUserPhone;
    }

    @Override
    public String getUserEmail() {
        return mUserEmail;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        return  false;
    }
}
